package com.learn.redis.config.properties;


import com.learn.redis.common.constants.RedisConstants;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author PC
 * 单体redis
 */
@Component
@ConfigurationProperties(prefix = "cus.redisson.single-properties")
public class SingleProperties {
    private String host = RedisConstants.defaultRedisInfo.DEFAULT_IP;
    private String port = RedisConstants.defaultRedisInfo.DEFAULT_PORT;
    private String username;
    private String password;

    private Integer database = RedisConstants.defaultRedisInfo.DEFAULT_DATABASE;

    private Boolean encryptEnabled = false;

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getPort() {
        return port;
    }

    public void setPort(String port) {
        this.port = port;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Boolean getEncryptEnabled() {
        return encryptEnabled;
    }

    public void setEncryptEnabled(Boolean encryptEnabled) {
        this.encryptEnabled = encryptEnabled;
    }

    public Integer getDatabase() {
        return database;
    }

    public void setDatabase(Integer database) {
        this.database = database;
    }
}
